package edu.zhku;

import java.io.File;

public class bianliall {
	public static void main(String[] args)
	{
		scandir("F:\\c");
	}
	public static void scandir(String dirname)
	{
		File dirFile = new File(dirname);
		String[] list = dirFile.list();
		for(int i = 0;i < list.length;i++)
		{
			String nameString = list[i];
			if(true == ".".equals(nameString)|| true == "..".equals(nameString) )
			{
				continue;
			}
			String curname = dirname + File.separator + nameString;
			File curFile = new File(curname);
			if(curFile.isFile() == true)
			{
				System.out.println(curname);
			}
			else if(curFile.isDirectory() == true)
			{
				System.out.println(curname + ":");
				scandir(curname);
			}
		}
		
		
	}
}